package edu.sctu.boot.admin.generator.utils;

public class BizPathUtils {
    public static final String getBizName(String raw) {
        return getTokens(raw)[1];
    }

    public static final String getPrefix(String raw) {
        String[] result = new String[2];
        for (int i = 0; i < 2; i++) {
            result[i] = getTokens(raw)[i];
        }
        return String.join("_", result);
    }

    public static final String removePrefix(String raw) {
        return raw.replace(getPrefix(raw), "").replace("_", "");
    }

    public static final String[] getTokens(String raw) {
        String[] tokens = raw.split("_");

        return tokens;
    }
}
